package com.example.android_demo2.workmanager

import android.content.Context
import android.util.Log
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import androidx.work.workDataOf

class LogWorker(appcontext: Context, workerParameters: WorkerParameters) : CoroutineWorker(appcontext, workerParameters) {
    override suspend fun doWork(): Result {
        val imageData = inputData.getString("IMAGE_DATA") ?: return Result.failure()
        printLog()
        return Result.success()
    }

    private fun printLog() {
        Log.e("aaaddd", "+++WorkManager---success" )
    }
}